namespace Brjnk.GpxExplorer.Localization
{
    using System;

    /// <summary>
    /// </summary>
    public class LocalizationConverter : System.Windows.Data.IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (values.Length == 1)
                return LocalizationManager.GetStringWithArgument((string)values[0], null);
            else
                return LocalizationManager.GetStringWithArgument((string)values[0], values[1]);
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}